<template>
  <div class="container">
    <global-header :user="currentUser" />
    <!-- <column-list :list="testData" /> -->
    <form>
      <div class="mb-3">
        <label for="exampleInputEmail1" class="form-label">邮箱地址</label>
        <validate-input :rules="emailRules" />
      </div>
    </form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import 'bootstrap/dist/css/bootstrap.min.css'
import ColumnList, { ColumnProp } from '@/components/ColumnList.vue'
import GlobalHeader, { UserProps } from '@/components/GlobalHeader.vue'
import ValidateInput, { RulesProp } from '@/components/ValidateInput.vue'

const currentUser: UserProps = {
  isLogin: true,
  name: 'dzy',
  id: 1
}
const testData: ColumnProp[] = [
  {
    id: 1,
    title: 'test1的专栏',
    description: '这是test1的专栏，sdfsfsdfdsfdsfdsfdf',
    avatar:
      'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1819216937,2118754409&fm=26&gp=0.jpg'
  },
  {
    id: 2,
    title: 'test2的专栏',
    description:
      '这是test2的专栏，sdfsfsdfdsfdsfdsfdf这是test2的专栏，sdfsfsdfdsfdsfdsfdf这是test2的专栏，sdfsfsdfdsfdsfdsfdf这是test2的专栏，sdfsfsdfdsfdsfdsfdf'
  },
  {
    id: 3,
    title: 'test3的专栏',
    description: '这是test3的专栏，sdfsfsdfdsfdsfdsfdf',
    avatar:
      'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1819216937,2118754409&fm=26&gp=0.jpg'
  },
  {
    id: 4,
    title: 'test4的专栏',
    description: '这是test4的专栏，sdfsfsdfdsfdsfdsfdf',
    avatar:
      'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1819216937,2118754409&fm=26&gp=0.jpg'
  }
]

export default defineComponent({
  name: 'App',
  components: {
    // ColumnList,
    GlobalHeader,
    ValidateInput
  },
  setup () {
    const emailRules: RulesProp = [
      {
        type: 'required',
        message: '电子邮箱地址不能为空'
      },
      {
        type: 'email',
        message: '请输入正确的电子邮箱'
      }
    ]
    return {
      testData,
      currentUser,
      emailRules
    }
  }
})
</script>

<style>
</style>
